{% macro render_field_with_errors(field) %}
    {% if field.errors %}
        {% for error in field.errors %}
            <div class="alert alert-danger" role="alert">{{ error }}</div>
        {% endfor %}
    {% endif %}
    <div class="form-group row">
        {{ field.label(class_='col-sm-5 col-form-label') }}
        <div class="col-sm-7">
            {{ field(**kwargs)|safe }}
        </div>
    </div>
{% endmacro %}

{% macro render_field(field) %}
    <div>{{ field(**kwargs)|safe }}</div>
{% endmacro %}
